# -*- coding:utf-8 -*-
"""
@Time : 2021/1/17 15:01
@Author: langengel
@Des: 应用启动文件
"""
import uvicorn

# LOGGING_CONFIG = {
#     "version": 1,
#     "disable_existing_loggers": False,
#     "formatters": {
#         "default": {
#             "()": "uvicorn.logging.DefaultFormatter",
#             "fmt": "%(levelprefix)s %(message)s",
#             "use_colors": None,
#         },
#         "access": {
#             "()": "uvicorn.logging.AccessFormatter",
#             "fmt": '%(levelprefix)s %(client_addr)s - "%(request_line)s" %(status_code)s',  # noqa: E501
#         },
#     },
#     "handlers": {
#         "default": {
#             "formatter": "default",
#             "class": "logging.StreamHandler",
#             "stream": "ext://sys.stderr",
#         },
#         "access": {
#             "formatter": "access",
#             "class": "logging.StreamHandler",
#             "stream": "ext://sys.stdout",
#         },
#     },
#     "loggers": {
#         "uvicorn": {"handlers": ["default"], "level": "INFO"},
#         "uvicorn.error": {"level": "INFO"},
#         "uvicorn.access": {"handlers": ["access"], "level": "INFO", "propagate": False},
#     },
# }

if __name__ == '__main__':
    uvicorn.run(
        app="saas.app:app",
        reload=True,
        host="0.0.0.0",
        port=8000,
        # log_level="info",
        # log_config=LOGGING_CONFIG,
        # access_log=True

    )
